home *** CD-ROM | disk | FTP | other *** search
- Path: Inter.NL.net!usenet
- From: E.H.Terwiel@inter.NL.net (E.H. Terwiel (Erik))
- Newsgroups: comp.lang.c
- Subject: Re: Can anyone help me on this?
- Date: Wed, 14 Feb 1996 18:36:05 GMT
- Organization: Inter.NL.net, The Internet Provider in The Netherlands.
- Message-ID: <4ftaal$700@altrade.nijmegen.inter.nl.net>
- References: <1856360.ensmtp@usenet.ggu.edu>
- NNTP-Posting-Host: utr98-15.utrecht.nl.net
- X-Newsreader: Forte Free Agent 1.0.82
-
- elaw@usenet.ggu.edu (Elaine Law) wrote:
-
- >A text comparison program that accepts two files as input & compares each word
- >of text and outputs corresponding excerpts of the two files that are different
- >to the screen. If the two files are identical, the program responds by
- >outputting line numbers at regular intervals as follows:
- >line 25:
- >line 50:
- >line 75:
-
- >Programs input:
- >The name of two files to be compared entered by the user.
- >The number of sequentially occurring words matched between the two files (a
- >treshold value) for the program to be considered textual mismatch to no longer
- >exist. Be sure to bound check this number.
-
- >Programs output:
- >Screen output showling line numbers periodically and textual quotes from both
- >files corresponding to the differences found.
-
- >Programming Hints:
- >First your program needs to access two input files, it makes sense to create a
- >file access ADT that can service both input files rather than having two sets
- >of customized input file service together.
-
- >Next, you need to determine how you are going to actually do this textual
- >compairson. One of the better ways of doing a textual compairon is based on
- >reading words from both files and keeping a line number counter updated for
- >both files. As long as words from both files are identical, this continues.
-
-
-
- Sounds like an AWK aplication ......
- Erik
-
-
-
-